package com.djq.hhc.model.shop;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.djq.hhc.model.base.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: dadd7
 * @Date: 2023/03/05/下午 4:12
 * @Description:
 */

@Data
@TableName("shop_order")
public class ShopOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableField("id")
    private Long id;

    @TableField("goods_id")
    private Long goodsId;

    @TableField("buyer_id")
    private Long buyerId;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    //逻辑删除(1:已删除，0:未删除)
    @JsonIgnore //@JsonIgnore作⽤:在json序列化时将pojo中的⼀些属性忽略掉，标记在属性或者⽅法上，返回的json数据即不包含该属性。
    @TableLogic //@TableLogic：表示逻辑删除注解
    @TableField("is_deleted")
    private Integer isDeleted;

    @TableField("status")
    private Integer status;
}
